package com.ethink.warehouse.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.info.LogisticsTraceApplyOrderInfo;
import com.ethink.warehouse.api.request.LogisticsTraceApplyDeleteRequest;
import com.ethink.warehouse.api.request.LogisticsTraceApplyOrderListRequest;
import com.ethink.warehouse.api.request.LogisticsTraceApplyOrderQueryRequest;
import com.ethink.warehouse.api.request.LogisticsTraceApplyTraceingQueryRequest;
import com.ethink.warehouse.api.response.LogisticsTraceApplyOrderGetDetailResponse;
import com.ethink.warehouse.api.response.LogisticsTraceApplyOrderQueryResponse;
import com.ethink.warehouse.common.entity.LogisticsTraceApplyOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 物流跟进申请表 Mapper接口
 *
 * @author default
 * @date 2022-12-15
 */
@Mapper
public interface LogisticsTraceApplyOrderMapper extends BaseMapper<LogisticsTraceApplyOrder> {

    /**
     * 分页查询
     *
     * @param buildPage
     * @param request
     * @return
     */
    Page<LogisticsTraceApplyOrderQueryResponse> queryLogisticsTraceApplyOrder(Page buildPage, @Param("request") LogisticsTraceApplyOrderQueryRequest request);

    /**
     * 列表查询
     *
     * @param request
     * @return
     */
    List<LogisticsTraceApplyOrderQueryResponse> listLogisticsTraceApplyOrder(@Param("request") LogisticsTraceApplyOrderListRequest request);

    /**
     * 跟进物流跟进单查询列表
     *
     * @param traceOrderNo
     * @return
     */
    List<LogisticsTraceApplyOrderInfo> listLogisticsTraceApplyOrderByTraceOrderNo(@Param("traceOrderNo") String traceOrderNo);

    /**
     * 详情
     *
     * @param id
     * @return
     */
    LogisticsTraceApplyOrderGetDetailResponse getLogisticsTraceApplyOrderById(@Param("id") Long id);

    int countTracing(@Param("request") LogisticsTraceApplyDeleteRequest request);

    void deleteApply(@Param("request") LogisticsTraceApplyDeleteRequest request);

    List<String> queryLogisticsTraceApplyTraceing(@Param("request") LogisticsTraceApplyTraceingQueryRequest request);
}